Quickbook API icon

Quickbook API

(0 reviews)

Creating a booking

POST /booking/create

Description

This endpoint allows booking a journey with Addison Lee. It supports the following scenarios:

  • Request a booking without previous quote
  • Request a booking with quote reference

Authorization

The Authorization header carried the API access token in the format AL client_id:client_secret. Please see Security page for more information.

Content Type

application/json

Creating a booking without quotation


Passenger booking

{
  "pickup_dt": "2017-10-01T09:00:00+01:00",
  "payment_method": "Account",
  "service": "standard_car",
  "locations": [
    {
        "source": "Address",
        "street_address": "Barbican Centre, 10 Silk St",
        "town": "London",
        "postcode": "EC2Y 8DS",
        "country": "GB",
        "lat": 51.520024,
        "long": -0.092447,
        "notes": "Wait before the car park and taxis entrance"
    },
    {
        "source": "Airport",
        "street_address": "London Heathrow Airport",
        "lat": 51.47138888,
        "long": -0.45277777,
        "airport": {
          "iata": "LHR",
          "terminal": "2",
          "flight_number": "BA714",
          "arrival_from": "LAX"
        }
    }
  ],
  "contact": {
    "name": "John Doe",
    "mobile": "07123456789",
    "email": "john.doe@example.com"
  },
  "passengers": [
    {
      "name": "Jane Doe",
      "mobile": "07262555555",
      "email": "jane.doe@example.com"
    },
    {
      "name": "Jane Smith",
      "mobile": "07123456789",
      "email": "jane.smith@example.com"
    }
  ]
}

Courier booking

{
  "pickup_dt": "2017-10-01T09:00:00+01:00",
  "payment_method": "Account",
  "service": "small_van",
  "locations": [
    {
      "source": "Address",
      "street_address": "Barbican Centre, 10 Silk St",
      "town": "London",
      "postcode": "EC2Y 8DS",
      "country": "GB",
      "lat": 51.520024,
      "long": -0.092447,
      "contact": {
        "name": "John Doe",
        "mobile": "07123456789",
        "email": "john.doe@example.com"
      }
    },
    {
      "source": "Address",
      "street_address": "The Point, 37 N Wharf Rd",
      "town": "London",
      "postcode": "W2 1AF",
      "country": "GB",
      "lat": 51.518461,
      "long": -0.178570,
      "contact": {
         "name": "Jane Doe",
         "mobile": "07123436789",
         "email": "jane.doe@example.com"
       }
    }
  ]
  "contact": {
    "name": "Sam Doe",
    "mobile": "0333 1234 56789",
    "email": "sam.doe@example.com"
  }
}
ParametersDescriptionRequired?
request_idRequest ID obtained from previous quote/price requestRequired for booking with quote
quote_idQuote Id obtained from previous quote/price requestRequired for booking with quote
pickup_dtThe date of the pickup. If omitted, then the journey is treated as ASAPNo
payment_methodThe payment method to be used for the journey. Valid values: Account, MultiAccount See Dev Guides / Multi-accountYes
locationsArray of locations. See Dev Guides / Building the locations array
as_directed_hoursThe period (in hours) in which the car is hired. This value is only considered when only one location is present.No
serviceThe product name for this journey. See Dev Guides / Passenger and courier service typesYes
contactBooking main contactYes
contact.nameContact nameYes
contact.mobileMobile phone numberYes
contact.emailEmail addressYes
passengersArray of passengersYes [3]
passengers.namePassenger name for the journeyYes
passengers.mobileMobile phone number of the passenger for the journeyYes
passengers.emailEmail address of the passenger for the journeyYes
as_directedThe ride locations are pointed by the customer in the course of the trip. The possible values are true or false. If "as_directed" : true the request message can have only one locationNo[2]
as_directed_hoursThe period (in hours) in which the car is hired. NumericRequired if "as_directed" : true[2]
destination_unknownThe customer does not specify the final location for the trip. This value is independent from as_directed, and as_directed_hours. Possible values are true or false. If "destination_unknown" : true the request message can have only one locationNo[2]

[1] required only if the parent object is present

[2] can't be used in bookings with a quote, only direct bookings

[3] not required for courier bookings

Creating a booking with quotation


Passenger booking

{
  "request_id": "682d84f0-ee14-424c-8252-eee72aa5f290",
  "quote_id": "000e4a24-1735-417b-81ab-89e57d6d154b",
  "pickup_dt": "2017-10-01T09:00:00+01:00",
  "payment_method": "Account",
  "service": "standard_car",
  "contact": {
    "name": "John Doe",
    "mobile": "07123456789",
    "email": "john.doe@example.com"
  },
  "passengers": [
    {
      "name": "Jane Doe",
      "mobile": "07262555555",
      "email": "jane.doe@example.com"
    },
    {
      "name": "Jane Smith",
      "mobile": "07123456789",
      "email": "jane.smith@example.com"
    }
  ]
}

Courier booking

{
  "request_id": "682d84f0-ee14-424c-8252-eee72aa5f290",
  "quote_id": "000e4a24-1735-417b-81ab-89e57d6d154b",
  "pickup_dt": "2017-10-01T09:00:00+01:00",
  "payment_method": "Account",
  "service": "small_van",
  "contact": {
    "name": "Sam Doe",
    "mobile": "0333 1234 56789",
    "email": "sam.doe@example.com"
  }
}
ParametersDescriptionRequired?
request_idRequest ID obtained from previous quote/price requestRequired for booking with quote
quote_idQuote Id obtained from previous quote/price requestRequired for booking with quote
pickup_dtThe date of the pickup. If omitted, then the journey is treated as ASAPNo
payment_methodThe payment method to be used for the journey. Valid values: Account, MultiAccount See Dev Guides / Multi-accountYes
as_directed_hoursThe period (in hours) in which the car is hired. This value is only considered when only one location is present.No
serviceThe product name for this journey. See Dev Guides / Passenger and courier service typesYes
contactBooking main contactYes
contact.nameContact nameYes
contact.mobileMobile phone numberYes
contact.emailEmail addressYes
passengersArray of passengers informationYes [3]
passengers.namePassenger name for the journeyYes
passengers.mobileMobile phone number of the passenger for the journeyYes
passengers.emailEmail address of the passenger for the journeyYes
as_directedThe ride locations are pointed by the customer in the course of the trip. The possible values are true or false. If "as_directed" : true the request message can have only one locationNo[2]
as_directed_hoursThe period (in hours) in which the car is hired. NumericRequired if "as_directed" : true[2]
destination_unknownThe customer does not specify the final location for the trip. This value is independent from as_directed, and as_directed_hours. Possible values are true or false. If "destination_unknown" : true the request message can have only one locationNo[2]

[1] required only if the parent object is present

[2] can't be used in bookings with a quote, only direct bookings

[3] not required for courier bookings

Extra Information


"information": [
  {
    "type": "Notes",
    "value": "Special Instruction Notes"
  },
  {
    "type": "Description",
    "value": "Addison Lee to Collect John Doe"
  }
]
ParametersDescriptionRequired?
information.typeThe type of information to be sentyes
information.valueThe value of the information to be sentyes

Extra information types:

  • Notes: Free text notes to show to the driver.
  • Description: Specific description information to show to the driver.

Important: Only one instance of each type is allowed. You can't post two Notes, for example.

Partner Reference


Some partners can implement an automatic retry for unsuccessful requests.

To prevent the creation of duplicated bookings, partners MUST include the partner reference booking ID in every booking request. Not supplying the partner reference booking ID will create a new booking for every request made.

This is a unique identifier of the booking in the partner' system.

Quickbook API uses the partner reference booking ID to guarantee that only one booking is created for a partner reference ID, even if the same request is received multiple times.

Additionally, the partner can also send the partner reference booking number. This is a more user-friendly identifier of the booking in the partner' system.

Below is an example of the partner reference object to include in the booking request.

"partner_reference": {
    "booking": {
      "id": "9d8760a1-84cb-42d5-8887-f9574e75ede7",
      "number": "345677"
    }
ParametersDescriptionTypeRequired?
partner_reference.booking.idThis is a unique identifier of the booking in the partner' system.String - 64 charsYes
partner_reference.booking.numberThis is a more user-friendly identifier of the booking in the partner' system.String - 64 charsNo

Additional details for the data types and format are provided in the API Console Documentation.

References


References are used for account-specific booking info, for example, 'department number' or 'cost code'.

References are only parsed if the used Account set-up supports or requires it; otherwise, they will be discarded.

"references" : [
  {
    "name" : "Cost Code",
    "value"    : "EX-389"
  },
  {
    "name" : "Department",
    "value" : "Accounts"
  }
]
ParametersDescriptionRequired?
references.nameName of the referenceYes[1]
reference.valueValue of the referenceYes[1]

[1] required only if the parent object is present

Response

{
  "job_uuid" : "36b5ffa8-61f0-11e5-9d70-feff819cdc9f",
  "job_number" : "654321",
  "booking_status" : "booked"
}
ParametersDescription
job_uuidUnique system identified for the booking
job_numberUser reference for the booking. Needs to be used in conjunction with the booking date
booking_statusThe booking status for your journey. This should be booked

Reviews